package com.genius.reservation.plague.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.genius.reservation.mapper.PlagueInformationMapper;
import com.genius.reservation.plague.entity.PlagueInformation;
import com.genius.reservation.plague.service.IPlagueInformationService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 双码信息 服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2022-05-26
 */
@Service
public class PlagueInformationServiceImpl extends ServiceImpl<PlagueInformationMapper, PlagueInformation> implements IPlagueInformationService {


    @Override
    public PlagueInformation findOneByDriver(String driverNumber) {
        LambdaQueryWrapper<PlagueInformation> wrapper = new LambdaQueryWrapper<>();
        LambdaQueryWrapper<PlagueInformation> eq = wrapper.eq(PlagueInformation::getDriverNumber, driverNumber);
        return this.getOne(eq);
    }
}
